//
//  QTTPDGLViewController.m
//  QuTouTiao
//
//  Created by 杨杨子 on 2018/7/1.
//  Copyright © 2018年 杨杨子. All rights reserved.
//

#import "QTTPDGLViewController.h"
#import "QTTPublicLabel.h"
#import "QTTPublicBtn.h"
@interface QTTPDGLViewController ()
@property (nonatomic,strong) NSMutableArray *myChannelArray;
@property (nonatomic,strong) NSMutableArray *addChannelArray;
@property (nonatomic,strong) QTTPublicBtn *editBtn;
@end

@implementation QTTPDGLViewController
-(NSMutableArray *)myChannelArray{
    if (!_myChannelArray) {
        _myChannelArray = [NSMutableArray array];
        _myChannelArray = [NSMutableArray arrayWithArray:@[@"视频",@"广州",@"热点",@"娱乐"]];
    }
    return _myChannelArray;
}
-(NSMutableArray *)addChannelArray{
    if (!_addChannelArray) {
        _addChannelArray = [NSMutableArray array];
        _addChannelArray = [NSMutableArray arrayWithArray:@[@"游戏",@"八卦",@"八婆"]];
    }
    return _addChannelArray;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.title = @"频道管理";
    [self createView];
}
#pragma -mark- createView
-(void)createView{
    CGFloat marginSpace = 20;
    CGFloat interSpace = 40;
    CGFloat height = 30;
    CGFloat width = SCREEN_WIDTH - marginSpace * 2 - interSpace * 2;
    CGFloat font = 15;
    //
    QTTPublicLabel *myChannelLabel = [[QTTPublicLabel alloc] initWithFrame:CGRectMake(20, marginSpace, width, height) alignment:NSTextAlignmentCenter textColor:[UIColor blackColor] backgroundColor:[UIColor clearColor] font:font delegate:self.view];
    myChannelLabel.text = @"我的频道";
    //
    QTTPublicBtn *editBtn = [[QTTPublicBtn alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - width, CGRectGetMinY(myChannelLabel.frame), width, height) andTittle:@"" AndTittleColor:[UIColor blackColor] AndTittleFont:font AndBackColor:[UIColor clearColor] AndFatherView:self.view];
    self.editBtn = editBtn;
    [editBtn setTitle:@"编辑" forState:UIControlStateNormal];
    [editBtn addTarget:self action:@selector(editBtnAction:) forControlEvents:UIControlEventTouchUpInside];
    //
    
    
}


#pragma -mark- action
-(void)editBtnAction:(UIButton *)sender{
    
}

@end
